// Replication files for Tables in "Democratic Incumbent Resilence"
// Using file SenateData.dta

//Table 1
tab GOP PickUp if ~exclude, row col
bys Open: tab GOP PickUp if ~exclude, row col chi2

//Table 2
reg IncPercAdj3 GOP IncAdv if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South i.Year if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl i.Year i.StateNum if ~Open&~exclude

probit PickUp GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres if ~Open&~exclude
probit PickUp GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South i.Year if ~Open&~exclude
probit PickUp GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl i.Year i.StateNum if ~Open&~exclude

//Table 3
probit Open GOP if ~exclude
probit Open IncAdv  MOD Terms IncHouseWave if ~exclude
probit Open GOP IncAdv GOPXIncAdv MOD MODXGOP Terms TermsXGOP IncHouseWave GOPXIncHouseWave if ~exclude

//Roustness Checks
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl SenXGOP South Midterm PresControl MidtermXPres MidtermXGOP PresXGOP MidXPresXGOP if ~Open&~exclude

//South & NonSouth
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl Midterm PresControl MidtermXPres if ~Open&~exclude&South
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl Midterm PresControl MidtermXPres if ~Open&~exclude&~South

//Midterms
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South PresControl if ~Open&~exclude&Midterm
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South PresControl if ~Open&~exclude&~Midterm

//Economy
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres Unemploy if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres Unemploy IncomeChange StockGrowth if ~Open&~exclude

//Finance Specification
reg IncPercAdj3 GOP IncAdv MOD Terms IncSpendAdv SpendSumln i.ChalQuality PrimaryOpp CDs SenControl South Midterm PresControl MidtermXPres if ~Open&~exclude

// Party Interactions
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp PrimaryOppXGOP CDs SenControl South Midterm PresControl MidtermXPres if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp PrimaryOppXGOP CDs SenControl South i.Year if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp PrimaryOppXGOP CDs SenControl i.Year i.StateNum if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendln IncSpendXGOP ChalSpendln ChalSpendXGOP ChalQuality##GOP PrimaryOpp PrimaryOppXGOP CDs CDsXGOP SenControl SenXGOP South SouthXGOP Midterm PresControl MidtermXPres MidtermXGOP PresXGOP MidXPresXGOP if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendln ChalSpendln ChalQuality##GOP PrimaryOpp PrimaryOppXGOP CDs CDsXGOP SenControl SenXGOP South SouthXGOP Midterm PresControl MidtermXPres MidtermXGOP PresXGOP MidXPresXGOP if ~Open&~exclude
reg IncPercAdj3 GOP IncAdv GOPXIncAdv MOD MODXGOP TermsXGOP Terms IncSpendAdv IncSpendAdvXGOP SpendSumln SpendSumlnXGOP ChalQuality##GOP PrimaryOpp PrimaryOppXGOP CDs CDsXGOP SenControl SenXGOP South SouthXGOP Midterm PresControl MidtermXPres MidtermXGOP PresXGOP MidXPresXGOP if ~Open&~exclude

// Interacted Year Fixed effects

reg IncPercAdj GOP IncAdv MOD Terms IncSpendln ChalSpendln i.ChalQuality PrimaryOpp CDs South Year##GOP if ~Open&~exclude

